<template>
  <div class="order-list-con">
    <div class="item-box" v-for="(item,index) in product" :key="index">
      <div class="item-img">
        <img :src="item.imgUrl" alt="">
      </div>
      <div class="item-name">
        {{item.name}}
      </div>
      <div class="item-price">
        <p class="price">￥{{item.price}}.00</p>
        <p class="num">X {{item.num}}</p>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'OrderList',
  props: ['product']
}
</script>

<style lang='less' scoped>
.order-list-con {
  .item-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 28px;
    .item-img {
      margin-right: 24px;
      img {
        width: 116px;
        height: 116px;
      }
    }
    .item-name {
      width: 100%;
      padding-right: 20px;
      display: -webkit-box;
      -webkit-box-orient: vertical;
      -webkit-line-clamp: 3; // 此行用于控制从多少行开始，溢出时用省略号替换
      overflow: hidden;
      word-break: break-all; // 自动换行
    }
    .item-price {
      text-align: right;
      color: rgba(0, 0, 0, 0.5);
    }
  }
}
</style>
